package org.ccvi.policy.entity.userinfo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.ccvi.policy.entity.userinfo.Identity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "pol_resource")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Resource extends Identity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5510534519288272559L;

	public static final String URL = "url";// 连接
	public static final String MENU = "menu";// 菜单
	public static final String OPER = "oper";// 操作
	
	private String type;
	private String action;
	private String module;
	private int position;

	public Resource() {
		super();
	}

	public Resource(String type, String action, String module, int position) {
		super();
		this.type = type;
		this.action = action;
		this.module = module;
		this.position = position;
	}

	@Column(name = "type_", length = 20)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "action_", length = 100)
	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	@Column(name = "module_", length = 20)
	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	@Column(name = "position_", length = 3)
	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}


}
